Repository navigation
Roll out site-wide citation popovers, local references, and citation cards (#200) - #1303
Conversation
|
👍 All image files/references (if any) are in webp format, in line with our policy. |
📝 Spell Check ResultsFound 6 potential spelling issue(s) when checking 31 changed file(s): 📄
|
| Line | Issue |
|---|---|
| 2140 | acn ==> can, acne |
📄 layouts/partials/citations/authors.html
| Line | Issue |
|---|---|
| 20 | Alle ==> All, Alley |
| 20 | Autor ==> Author |
| 20 | Alle ==> All, Alley |
| 20 | Autor ==> Author |
| 20 | Autor ==> Author |
ℹ️ How to address these issues:
- Fix the typo: If it's a genuine typo, please correct it.
- Add to whitelist: If it's a valid word (e.g., a name, technical term), add it to
.codespell-ignore.txt - False positive: If this is a false positive, please report it in the PR comments.
🤖 This check was performed by codespell
There was a problem hiding this comment.
All reported issues were addressed across 25 files
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Turn on auto-fix | Re-trigger cubic
…inline link, and fix bibliography generator quirks
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 10 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 7 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…ons-rollout-1062 # Conflicts: # layouts/partials/citations/authors.html # layouts/partials/citations/entry.html
Summary
PR #1062 introduced site-wide citation popovers (
{{< cite >}},{{< references >}},{{< citation-card >}}) backed bycontent/glossary/apa_lookup.json, but only piloted them on three Educators' Corner posts,cite_us.md, glossary terms, and two citation-card pages. Readers on the rest of the site still met plain-text citations, split reference lists, raw URLs inside popovers with no open-access indicator, and unstyled "How to cite" blocks without copy buttons.This PR audits all non-generated pages on
rebrand-doors, redesigns the citation popover into a lighter APA card with build-time OpenAlex/Unpaywall open-access enrichment (showing OA status and direct free-to-read links when a DOI is paywalled), hardens citation infrastructure forwidget_pagesections and page-local APA reference lists, and rolls out popovers, unified hanging-indent reference lists, and standardized citation cards across 12 hand-written pages.Fixes #200
What changed
Citation popover redesign & build-time Open Access enrichment
assets/js/doors/citations.js,assets/js/doors/popover.js,assets/css/doors/popover.css):Open access,Free copy · <Repository>,Paywalled, orReferencewhen no DOI) and an aligned×close button (44 px tap area).https://doi.org/.../Available at:URL clutter stripped from display whileCopy referencealways copies the complete reference including its DOI/URL.--surfacefooter bar pairing clean action links (Read free PDF ↗/Read free copy ↗+DOI ↗for Green OA,Read article ↗for direct OA,Publisher DOI ↗for paywalled,Open source ↗for non-DOI URLs) with an outlinedCopy referencebutton and animated checkmark feedback..site-head(when in view) and visible.cc-windowcookie banners, clamptopandmaxHeighttogether, and sit atz-index: 950(above the collapsed Just-OS launcher at900; below header at1000and open chat at10000).scripts/enrich_citation_oa.py,data/citation_oa.json,.github/workflows/data-processing.yml,layouts/partials/citations/metadata.html,layouts/partials/citations/entry.html,scripts/rebrand/check_source_rules.py):content/glossary/apa_lookup.jsonand{{< local-references >}}DOIs — 429 / 431 DOIs enriched (208 direct OA, 78 paywalled papers with Green OA free copies, 143 paywalled).data-processing.yml(offline/deterministic Hugo builds; zero runtime third-party API requests from browsers).Shortcodes, author lists, checks & generator fixes
{{< cite >}}(layouts/shortcodes/cite.html): Added optionaltext="..."parameter to preserve each author's exact visible wording and punctuation while linking to#ref-<key>.{{< local-references >}}(layouts/shortcodes/local-references.html): New paired shortcode for pages with manual APA reference lists not inapa_lookup.json. Merges any{{< cite >}}entries from.Page.Storealphabetically into one<ul class="references-list" data-local-references="true">with author-collapse toggles andlocal-<md5>keys.assets/js/doors/citations.js,assets/js/doors/citation-matches.js): Runs conservative author-year matching on.article-stylewhen[data-local-references]is present (skipping links, headings, code, summaries, reference lists, citation cards, and glossary layouts), including optionalp./pp.page locators on both parenthetical and narrative citations.layouts/partials/citations/authors.html,layouts/shortcodes/citation-card.html,layouts/shortcodes/cite-us.html,assets/css/doors/citations.css): Suggested citations ({{< citation-card >}}and{{< cite-us >}}) now show up to 10 authors in full before collapsing (reference lists keep 5), and.ref-authors-toggleis styled as a plain inline underlined link instead of a floating bordered pill.layouts/partials/citations/metadata.html,bibtex_to_apa/bibtex_to_apa.js): Extended date regex for APA 7 full dates like(2021a, July 12)and hardened URL/DOI extraction for parenthetical DOIs (10.1002/(SICI)...); fixedbibtex_to_apa.jsto normalise, & et al.→, et al.(Klein2014) and^Forrt.→FORRT.(FORRT2019) on the nextdata-processing.ymlrun.assets/css/doors/citations.css,layouts/shortcodes/citation-card.html): Styled non-glossary.article-layout .article-style ul.references-listwith clean APA hanging indents (1.5em) andoverflow-wrap: anywhere; deduplicatedcite_us.css<link>per page via.Page.Store.scripts/check_seo_html.py,scripts/tests/,CONTRIBUTING.md): Extended Check 15 to verify everya.cite[data-cite]resolves to a matching[data-reference]entry and fail on truncateddata-sourceDOIs/URLs (both unbalanced parentheses and balanced-prefix truncation); added unit tests (test_enrich_citation_oa.py,test_citation_matches.py,test_check_seo_html.py).Content rollout (12 non-generated pages)
{{< cite >}}+{{< references >}}):content/manuscript/manuscript.md(widget_page): 4 exact citations inside{{< expand >}}(Vazire2018,Nosek2012Bar_Anan,Nosek2012b,FORRT2019) +{{< references >}}.content/reversals/reversals.md(widget_page): 24 verified citations across 7 exact DOI-matched papers (Klein2014×12,EbersoleEtAl2016×5,Clark2019×2,Simonsohn2014effect×2,Kerr2018×1,Mellers2001×1,Klein2018ManyLabs2×1) +{{< references >}}+ standardized{{< citation-card >}}under How to cite.content/educators-corner/011-intersectionality-open-science/index.md: 2 remaining citations (HenrichHeineNorenzayan2010,BahlaiEtAl2019) preserving exact visible text.{{< local-references >}}):content/educators-corner/010-Neurodiversity/index.md: Unified split{{< references >}}+### Other references(31 raw paragraphs) into one alphabetical## Referenceslist (34 entries, 32 live popovers, 12 author toggles,Referenceslink in TOC).content/educators-corner/018-accessible-feedback-in-research/index.md: Wrapped 8 manual references (7 live popovers).content/educators-corner/016-reviewer-zero/index.md: Wrapped 5 manual references (all 5 live popovers) and removed 2 broken Zotero Google Docs draft links.content/dei/2-intro-text.md(widget_page): Wrapped 4 manual references (all 5 in-text citations live, linkingHenrich, Heine & Norenzayan, 2010to the Nature 2010 entry listed on that page).{{< citation-card >}}blocks:content/pedagogies/001-Julia-Strand/index.md,002-Gilad-Feldman/index.md,003-CREP/index.md,004-Thomas-Rhys-Evans/index.md(all 6 authors on004shown in full under the 10-author suggested-citation limit).content/neurodiversity/neurodiversity.md(bothBibliographic Referencespoilers, with inlineShow all 14 authorslink on the 14-author entry).Before & After
manuscript— Green OA popover (Free copy · OSF+DOI, 1440 px & 390 px)reversals— Direct Open Access popover + inline author link (1440 px & 390 px)Paywalled DOI (
ec011) & Non-DOI local reference (ec018, 1440 px & 390 px)ec011, 1440 px)ec018, 1440 px)ec018, 390 px)Unified hanging-indent references (
ec010&ec004) and full-author citation card (ped004)ec010Before (1440 px)ec010After (1440 px)ped004Before (1440 px)ped004After (1440 px)ec004Before (1440 px)ec004After (1440 px)Decisions to review
How to citewording & DOI links (content/reversals/reversals.md): "Please cite this source as Hartmann H…" was split into"Please cite this source as:", the{{< citation-card >}}, and"Contributors are listed…"as its own paragraph. Also, the 24 converted citations now open citation popovers alongside direct blue DOI links for non-bibliography studies on the same lines.content/educators-corner/016-reviewer-zero/index.md): Removed two brokenhttps://www.zotero.org/google-docs/?...links around(Silbiger & Stubler, 2019)and(Hamedani & Markus, 2019)(visible text unchanged) so they link to the page's References popovers instead.ec011(content/educators-corner/011-intersectionality-open-science/index.md):HenrichHeineNorenzayan2010(BBS WEIRD paper) andBahlaiEtAl2019were matched from context since011has no existing reference list — please confirm.content/neurodiversity-lessonbank/(deferred to avoid PR Neurodiversity Lesson Bank: embed Activity 1 H5P natively, fix #1016, and restyle for Doors #1294 conflicts),content/educators-corner/022-repro-metrics-forrt-irise/index.md(Vancouver numeric style), and all verified false-positive same-author-year traps.bibtex_to_apa/bibtex_to_apa.jssoFORRT2019(Forrt.) andKlein2014(, & et al.) normalise automatically on the nextdata-processing.ymlrun;apa_lookup.jsonitself is not hand-edited here perAGENTS.md.Checks
hugo --gc --minify(0 errors, 0 new warnings) &node --check bibtex_to_apa/bibtex_to_apa.jspython3 -m unittest scripts/tests/test_citation_matches.py scripts/tests/test_check_seo_html.py scripts/tests/test_enrich_citation_oa.py(58 tests OK) andpython3 -m unittest discover -s scripts -p 'test_parse_disciplines_gdoc.py'(11 tests OK)python3 scripts/rebrand/check_source_rules.py --base origin/rebrand-doors(0 hard-coded URLs, 0 generated files changed)python3 scripts/check_seo_html.py(all 28 checks PASS across 3,425 pages)python3 scripts/rebrand/compare_builds.py(0 removed paths, 0 added addresses, 0 structured-data drops, 0 SEO tag changes)axe-coreaudit on the redesigned Option B citation popover + modified pages (0 WCAG A/AA violations)Created with Gemini 4 Neon in Antigravity (reviewed with Claude Opus 5.5).